<div class="page_heading_text">Buy books</div>
<div class="clear"></div> 

<div class="clear" style="margin-bottom:20px;"></div>
<? foreach($book_details as $book_detail){ ?>
 <!-- Start Book Package -->  
	  <div class="sellBook_area">
		<div class="sell_book_image_area">
			<span style="float:left; border:1px solid #999; margin-bottom:14px;">
				<a href="<?=site_url('buy-books/books/'.$book_detail->id.'/'.url_title($book_detail->Name, 'dash', TRUE))?>"><img src="<?=(!empty($book_detail->Image)? base_url('images/books/'.$book_detail->Image):base_url('images/book_img_01.jpg'))?>" width="117" height="160" border="0" alt="" /></a>
			</span>
			<div class="add_to_cart"><a href="<?=site_url('cart/add/' . $book_detail->id)?>" id="cart_add_link_<?=$book_detail->id?>" class="cart-add-link">ADD TO CART</a></div>
			<div class="buy_book_cart_image">
				<a href="<?=site_url('cart/add/' . $book_detail->id)?>" id="cart_add_link_<?=$book_detail->id?>" class="cart-add-link">
					<img src="<?=base_url('images/curt_image.png')?>" width="20" height="15" border="0" alt="" />
				</a>
			</div>
		</div>
		<div class="sell_book_image_area_right">
		  <div class="bookTitle"><?= $book_detail->Name ?></div>
			  <div class="ezbook_price">EZ PRICE: $<?=number_format ( $book_detail->Sell_price , 2 , '.' , ',' ) ?></div>
				  <div class="you_save_text"><span>$<?=number_format ( $book_detail->Real_price , 2 , '.' , ',' ) ?></span><br /> You save <a>$<?=number_format ( ($book_detail->Real_price-$book_detail->Sell_price) , 2 , '.' , ',' ) ?></a></div>
			  <div class="bookDetails"><?=character_limiter($book_detail->Description, 20) ?>...&nbsp;&nbsp;<a href="<?=book_url($book_detail->id, $book_detail->Name)?>">Details</a></div>
		  <div class="bookDetails"><a href="<?=site_url('cart/checkout/'.$book_detail->id)?>"><img src="<?=base_url('images/curt_buy_books_btn.png')?>" width="121" height="22" border="0" alt="" /></a></div>
		</div>
	</div>
 <!-- End Book Package -->
 <? } ?>
	<div class="clear" style="margin-bottom:20px;"></div>          

 <div class="pagination_main">
   <div class="pagination">
   <?=$pagination?>
	 <!-- span class="prev">Prev</span>&nbsp; &nbsp;<span class="page_link">
		<span a href="#" class="block">1</span>
	 </span> 
	 <span class="page_link"><a href="#" class="normalblock">2</a></span> ...  <span class="page_link"><a href="#" class="normalblock">5</a></span> 
	 <span class="page_link"><a href="#" class="normalblock">6</a></span>  <span class="page_link"><a href="#" class="normalblock">7</a></span>
	 <span class="page_link"><a href="#" class="normalblock">8</a></span>  <span class="page_link"><a href="#" class="normalblock">9</a></span>
	   ...  <span class="page_link"><a href="#" class="normalblock">99</a></span>  <span class="page_link"><a href="#" class="normalblock">100</a></span>
	  &nbsp;&nbsp; <a href="#" class="next">Next</a> -->
   </div> 
	</div>
<div class="clear"></div>